The present invention relates generally to computer system input/output (I/O) processing, and more specifically to efficient handling of queued-direct I/O (QDIO) requests associated with data protection information for communicating with small computer system interface devices.
A QDIO request provides a means for a program, such as an operating system, to directly and asynchronously communicate with one or more I/O devices (or a network of devices), or to other programs or operating systems via an external or internal network, by the use of data queues constructed and managed in main storage of a computer system. The use of main storage queues allows the communication to be performed in a predictable and efficient manner without requiring the services of a centralized controlling mechanism, such as an operating system I/O supervisor, and the resulting overhead such a mechanism implies.
An adapter supporting QDIO may have input queues and/or output queues. When QDIO input queues are used, the program can directly access data placed into the input queues by the adapter. Typically, the source of the data placed into such input queues is an I/O device or network of devices to which the adapter is connected. Correspondingly, when QDIO output queues are used, the program can transmit data directly to the adapter by placing data into the appropriate output queues. Depending on the adapter, the data placed into such output queues may be used internally by the adapter or may be transmitted to one or more I/O devices to which the adapter is connected
Each QDIO queue may be associated with 128 buffers. The queue component that describes a buffer is referred to a storage-buffer-address list (SBAL). An SBAL is effectively a scatter/gather list that designates up to 16 storage areas that comprise the I/O buffer that the adapter uses to transfer data. Therefore, the SBAL is comprised of 16 SBAL entries (SBALEs), each of which may designate a storage block of the buffer.
For both QDIO input queues and QDIO output queues, main storage is used as the medium by which data is exchanged between the program and the adapter. Additionally, these queues provide the ability for both the program and the adapter to directly communicate with each other in an asynchronous manner that is both predictable and efficient without requiring the services of a centralized controlling mechanism, such as an operating-system input/output supervisor, and the resulting overhead such a control mechanism implies. Both input and output queues are constructed in main storage by the program and are initialized and activated when connection to the adapter is established at the QDIO. Each queue is made up of multiple separate data structures, called queue components that collectively describe characteristics of the queue and provide the necessary controls to allow the exchange of data between the program and the adapter.
Associated with a QDIO queue's 128 buffers is a 128-byte array. Each byte in the array contains the state of the corresponding buffer and acts as a finite state machine for the buffer. This array is referred to as a storage-list-state block (SLSB). When an SLSB indicates that the corresponding buffer is in the adapter-owned state, the adapter may use the buffer to transfer data to the program, and the program does not reference or change the buffer. Otherwise, when an SLSB indicates that the corresponding buffer is in the program-owned state, the program may reference and/or change the buffer and the adapter does not use the buffer for data transfer.